package com.hc.accountservice.service.Impl;

import com.hc.accountservice.mapper.AccountMapper;
import com.hc.accountservice.service.AccountService;
import com.hc.entity.PayRecord;
import com.hc.entity.Wallet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @BelongsProject: hc
 * @BelongsPackage: com.hc.accountservice.service.Impl
 * @Author: WY
 * @CreateTime: 2022-10-19  19:49
 * @Descriprion: TODO
 * @Version: 1.0
 **/
@Service
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountMapper accountMapper;

    @Override
    public List<PayRecord> findByPage(PayRecord payRecord) {
        List<PayRecord> payRecordList = accountMapper.findByPage(payRecord);
        return payRecordList;
    }

    @Override
    public Wallet findBalance(int id) {
        Wallet wallet = accountMapper.findBalance(id);
        return wallet;
    }
}
